using System;
using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class AxisType
    {

        private string _CrossAt;
        private Nullable<bool> _Interlaced;
        private Nullable<bool> _LogScale;
        private MajorGridLinesType _MajorGridLines;
        private string _MajorInterval;
        private AxisTypeMajorTickMarks _MajorTickMarks;
        private Nullable<bool> _Margin;
        private string _Max;
        private string _Min;
        private MinorGridLinesType _MinorGridLines;
        private string _MinorInterval;
        private AxisTypeMinorTickMarks _MinorTickMarks;
        private Nullable<bool> _Reverse;
        private Nullable<bool> _Scalar;
        private StyleType _Style;
        private TitleType _Title;
        private Nullable<bool> _Visible;

        public string CrossAt
        {
            get
            {
                return _CrossAt;
            }
            set
            {
                _CrossAt = value;
            }
        }

        public Nullable<bool> Interlaced
        {
            get
            {
                return _Interlaced;
            }
            set
            {
                _Interlaced = value;
            }
        }

        public Nullable<bool> LogScale
        {
            get
            {
                return _LogScale;
            }
            set
            {
                _LogScale = value;
            }
        }

        public MajorGridLinesType MajorGridLines
        {
            get
            {
                if (_MajorGridLines == null)
                    _MajorGridLines = new MajorGridLinesType();
                return _MajorGridLines;
            }
            set
            {
                _MajorGridLines = value;
            }
        }

        public string MajorInterval
        {
            get
            {
                return _MajorInterval;
            }
            set
            {
                _MajorInterval = value;
            }
        }

        public AxisTypeMajorTickMarks MajorTickMarks
        {
            get
            {
                return _MajorTickMarks;
            }
            set
            {
                _MajorTickMarks = value;
            }
        }

        public Nullable<bool> Margin
        {
            get
            {
                return _Margin;
            }
            set
            {
                _Margin = value;
            }
        }

        public string Max
        {
            get
            {
                return _Max;
            }
            set
            {
                _Max = value;
            }
        }

        public string Min
        {
            get
            {
                return _Min;
            }
            set
            {
                _Min = value;
            }
        }

        public MinorGridLinesType MinorGridLines
        {
            get
            {
                if (_MinorGridLines == null)
                    _MinorGridLines = new MinorGridLinesType();
                return _MinorGridLines;
            }
            set
            {
                _MinorGridLines = value;
            }
        }

        public string MinorInterval
        {
            get
            {
                return _MinorInterval;
            }
            set
            {
                _MinorInterval = value;
            }
        }

        public AxisTypeMinorTickMarks MinorTickMarks
        {
            get
            {
                return _MinorTickMarks;
            }
            set
            {
                _MinorTickMarks = value;
            }
        }

        public Nullable<bool> Reverse
        {
            get
            {
                return _Reverse;
            }
            set
            {
                _Reverse = value;
            }
        }

        public Nullable<bool> Scalar
        {
            get
            {
                return _Scalar;
            }
            set
            {
                _Scalar = value;
            }
        }

        public StyleType Style
        {
            get
            {
                if (_Style == null)
                    _Style = new StyleType();
                return _Style;
            }
            set
            {
                _Style = value;
            }
        }

        public TitleType Title
        {
            get
            {
                if (_Title == null)
                    _Title = new TitleType();
                return _Title;
            }
            set
            {
                _Title = value;
            }
        }

        public Nullable<bool> Visible
        {
            get
            {
                return _Visible;
            }
            set
            {
                _Visible = value;
            }
        }

        public AxisType()
        {
            _Interlaced = new Nullable<bool>[]();
            _LogScale = new Nullable<bool>[]();
            _Margin = new Nullable<bool>[]();
            _Reverse = new Nullable<bool>[]();
            _Scalar = new Nullable<bool>[]();
            _Visible = new Nullable<bool>[]();
        }

        public AxisType Write()
        {
            AxisType axisType = new AxisType();
            ArrayList arrayList1 = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            if (_CrossAt != null)
            {
                arrayList1.Add(_CrossAt);
                arrayList2.Add(1);
            }
            if (_Interlaced.get_HasValue())
            {
                arrayList1.Add(_Interlaced);
                arrayList2.Add(2);
            }
            if (_LogScale.get_HasValue())
            {
                arrayList1.Add(_LogScale);
                arrayList2.Add(3);
            }
            if (_MajorGridLines != null)
            {
                arrayList1.Add(_MajorGridLines.Write());
                arrayList2.Add(4);
            }
            if (_MajorInterval != null)
            {
                arrayList1.Add(_MajorInterval);
                arrayList2.Add(5);
            }
            arrayList1.Add(_MajorTickMarks);
            arrayList2.Add(6);
            if (_Margin.get_HasValue())
            {
                arrayList1.Add(_Margin);
                arrayList2.Add(7);
            }
            if (_Max != null)
            {
                arrayList1.Add(_Max);
                arrayList2.Add(8);
            }
            if (_Min != null)
            {
                arrayList1.Add(_Min);
                arrayList2.Add(9);
            }
            if (_MinorGridLines != null)
            {
                arrayList1.Add(_MinorGridLines.Write());
                arrayList2.Add(10);
            }
            if (_MinorInterval != null)
            {
                arrayList1.Add(_MinorInterval);
                arrayList2.Add(11);
            }
            arrayList1.Add(_MinorTickMarks);
            arrayList2.Add(12);
            if (_Reverse.get_HasValue())
            {
                arrayList1.Add(_Reverse);
                arrayList2.Add(13);
            }
            if (_Scalar.get_HasValue())
            {
                arrayList1.Add(_Scalar);
                arrayList2.Add(14);
            }
            if (_Style != null)
            {
                arrayList1.Add(_Style.Write());
                arrayList2.Add(15);
            }
            if (_Title != null)
            {
                arrayList1.Add(_Title.Write());
                arrayList2.Add(16);
            }
            if (_Visible.get_HasValue())
            {
                arrayList1.Add(_Visible);
                arrayList2.Add(17);
            }
            axisType.Items = arrayList1.ToArray();
            axisType.ItemsElementName = (ItemsChoiceType25[])arrayList2.ToArray(typeof(ItemsChoiceType25));
            arrayList2 = arrayList1 = null;
            return axisType;
        }

    } // class AxisType

}

